home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / langs / xlisp_21.zoo / xlisp.ref / text0001.txt < prev   
Encoding:
Text File  |  1990-02-28  |  1.4 KB  |  73 lines

  1. To everyone who has obtained Tim Mikkelsen's excellent and very
  2. useful XLISP Reference in ASCII format, the following sed script
  3. might be of interest to you.  It slightly reformats the document
  4. so that when piped through pr(1), there are no empty pages.  It
  5. also keeps the text within reasonable margins for printing on
  6. 8.5x11" paper, and provides some additional consistency in tabbing
  7. and line spacing.
  8.  
  9. Assuming that you have the files ref1.Z, ref2.Z, ref3.Z, ref4.Z,
  10. and ref5.Z as provided by Tim Mikkelsen, and the sed script
  11. contained here has been saved as sedf; the following command, or a
  12. variation, will produce the reformatted document in the file prt:
  13.  
  14. $ zcat ref[1-5].Z | sed -f sedf | pr -h "XLISP Reference" > prt
  15.  
  16. --
  17. John E Van Deusen III, PO Box 9283, Boise, ID  83707, (208) 343-1865
  18.  
  19. uunet!visdc!jiii
  20.  
  21. ===cut here===
  22. /^[ ]$/,${
  23.     s/^[    ]        /        /
  24.     s/^        /    /
  25.     s/^ [    ]/    /
  26.     /^ /s/^ */    /
  27.     /^[    ][    ]*  [    ][    ]*/s/  //
  28.     /^EXAMPLES$/,/^[^    ]/{
  29.         /^[     ]*$/d
  30.         /^    /!{
  31.             /^EXAMPLES$/a\
  32.  
  33.             /^EXAMPLES$/!{
  34.                 /^[ ]/!i\
  35.  
  36.             }
  37.  
  38.         }
  39.         s/^    //
  40.     }
  41.     /^SYNTAX$/,/^DESCRIPTION$/{
  42.         /^[    ][    ]*<.*>.*-/,/^$/{
  43.             s/- *[    ]/- /
  44.             />.*- /!{
  45.                 /^[    ][    ]* /!{
  46.                     s/^[    ][    ]*/&  /
  47.                 }
  48.                 s/^    //
  49.             }
  50.         }
  51.     }
  52.     /^DESCRIPTION$/,/^EXAMPLES$/{
  53.         s/  */ /g
  54.         s/\. /\.  /g
  55.     }
  56.     /^[A-Z][A-Z ]*:/,/^$/{
  57.         s/  */ /g
  58.         s/\. /\.  /g
  59.     }
  60.     /^$/,/^..*/{
  61.         /^$/d
  62.         /^[ ]$/!i\
  63.  
  64.     }
  65.     /^[ ]$/,/^.*/{
  66.         /^[ ]$/d
  67.         /^$/d
  68.         /^.*$/s/^.*$/ &/
  69.     }
  70. }
  71.  
  72.  
  73.